<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>系统登录</title>
<style type="text/css">
	*{
		margin: 0px;
		padding: 0px;
	}
	#div_boss{
		width: 1920px;
		height: 1080px;
		background:url("/bbs/img/login_bg.png");
		position: absolute;
	}
	#div1{
		width: 480px;
		height: 480px;
		opacity: 0.9;
		background: #efeff0;
		border-radius: 20px;
		margin-top: 275px;
		margin-left: 1223px;
	}
	#div1_head1{
		width: 56px;
		height: 12px;
		opacity: 1;
		font-size: 14px;
		font-family: Microsoft YaHei UI, Microsoft YaHei UI-Regular;
		font-weight: 400;
		text-align: center;
		color: #96a3b0;
		margin-top: 38px;
		margin-left: 40px;
		margin-right: 384px;
		margin-bottom: 430px;
		position: absolute;
	}
	#div1_head2{
		width: 144px;
		height: 34px;
		opacity: 1;
		font-size: 36px;
		font-family: Microsoft YaHei UI, Microsoft YaHei UI-Bold;
		font-weight: 700;
		text-align: center;
		color: #4e4e4e;
		margin-top: 68px;
		margin-left: 41px;
		margin-right: 295px;
		margin-bottom: 378px;
		position: absolute;
	}
	#u_name{
		width: 48px;
		height: 15px;
		opacity: 1;
		font-size: 16px;
		font-family: Microsoft YaHei UI, Microsoft YaHei UI-Regular;
		font-weight: 400;
		text-align: center;
		color: #737474;
		margin-top: 174px;
		margin-left: 41px;
		margin-right: 393px;
		margin-bottom: 291px;
		position: absolute;
	}
	#u_nameinput{
		width: 343px;
		height: 50px;
		opacity: 1;
		background: #f1f1f1;
		border: 1px solid #dfefff;
		border-radius: 6px;
		margin-top: 157px;
		margin-left: 100px;
		margin-right: 36px;
		margin-bottom: 273px;
		position: absolute;
	}
	#imge1{
		width: 24px;
		height: 24px;
		opacity: 1;
		z-index:1;
		margin-top: 13px;
		margin-left: 12px;
		margin-right: 307px;
		margin-bottom: 13px;
		position: absolute;
	}
	#uname{
		width: 343px;
		height: 50px;
		border:none;
		opacity: 1;
		font-size: 20px;
		font-family: Microsoft YaHei UI, Microsoft YaHei UI-Regular;
		outline:none;
		position: absolute;
	}
	#uname:hover{
		border:1px solid #dfefff;
	}
	#no_uname{
		width:110px;
		height:30px;
		color:red;
		font-size: 17px;
		margin-left: 100px;
		margin-top: 207px;
		position: absolute;
	}
	#u_password{
		width: 47px;
		height: 16px;
		opacity: 1;
		font-size: 16px;
		font-family: Microsoft YaHei UI, Microsoft YaHei UI-Regular;
		font-weight: 400;
		text-align: center;
		color: #737474;
		margin-top: 257px;
		margin-left: 41px;
		margin-right: 393px;
		margin-bottom: 207px;
		position: absolute;
	}
	#u_passwordinput{
		width: 343px;
		height: 50px;
		opacity: 1;
		background: #f1f1f1;
		border: 1px solid #dfefff;
		border-radius: 6px;
		margin-top: 240px;
		margin-left: 100px;
		margin-right: 36px;
		margin-bottom: 190px;
		position: absolute;
	}
	#imge2{
		width: 24px;
		height: 24px;
		opacity: 1;
		z-index:1;
		margin-top: 13px;
		margin-left: 12px;
		margin-right: 307px;
		margin-bottom: 13px;
		position: absolute;
	}
	#upass{
		width: 343px;
		height: 50px;
		border:none;
		opacity: 1;
		font-size: 20px;
		font-family: Microsoft YaHei UI, Microsoft YaHei UI-Regular;
		outline:none;
		position: absolute;
	}
	#upass:hover{
		border:1px solid #dfefff;
	}
	#false_password{
		width:110px;
		height:30px;
		color:red;
		font-size: 17px;
		margin-left: 100px;
		margin-top: 290px;
		position: absolute;
	}
	#logininput{
		width: 404px;
		height: 51px;
		opacity: 1;
		background: #409eff;
		border:none;
		border-radius: 26px;
		font-size: 19px;
		font-family: Microsoft YaHei UI, Microsoft YaHei UI-Regular;
		font-weight: 400;
		text-align: center;
		color: #f4f4f5;
		outline:none;
		margin-top: 363px;
		margin-left: 41px;
		margin-right: 35px;
		margin-bottom: 66px;
		position: absolute;
	}
	#logininput:hover{
		cursor: pointer;
		opacity: 0.9;
		font-size: 20px;
	}
</style>
</head>
<body>
	<div id="div_boss">
		<form>
			<div id="div1">
				<div id="div1_head1">欢迎使用</div>
				<div id="div1_head2">系统登录</div>
				<div id="u_name">用户名</div>
				<div id="u_nameinput">
					<div id="imge1"><img alt="用户名" src="/bbs/img/login_user.png"></div>
					<input type="text" id="uname" name="uname">
				</div>
				<div id="no_uname"><span></span></div>
				<div id="u_password">密&nbsp;&nbsp;&nbsp;码</div>
				<div id="u_passwordinput">
					<div id="imge2"><img alt="密码" src="/bbs/img/login_key.png"></div>
					<input type="password" id="upass" name="upass">
				</div>
				<div id="false_password"><span></span></div>
				<input type="button" id="logininput" value="登录" onclick="login()">
			</div>
		</form>
	</div>
</body>
<script type="text/javascript" src="/bbs/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
	function login() {
		$.post("login",$("form:eq(0)").serialize(),function(data){
			if(data==0){
				//没有用户
				$("span:eq(0)").empty();
				$("span:eq(1)").empty();
				$("span:eq(0)").html("没有该用户");
				return;
			}else if(data==-1){
				//密码错误
				$("span:eq(0)").empty();
				$("span:eq(1)").empty();
				$("span:eq(1)").html("密码输入有误");
				return;
			}else{
				//登陆成功
				$("span:eq(0)").empty();
				$("span:eq(1)").empty();
				location.href = "/bbs/login_succ/listMsg.html";
			}
		},"text");
	}
</script>
</html>